<!-- preciser encodage page html , echapper l'affichage --> 
<!DOCTYPE html> 
<html> 
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
    </head> 
    <body> 
        <?php //var_dump($this->paginator); ?>
        <table border=1px> 
            <?php foreach ($this->paginator as $unVisiteur): //tableau d'objets ?> 
                <tr> 
                    <td><?php echo $this->escape($unVisiteur['id']); ?></td> 
                    <td><?php echo $this->escape($unVisiteur['nom']); ?></td> 
                    <td><?php echo $this->escape($unVisiteur['prenom']); ?></td> 
                </tr> 
            <?php endforeach; ?> 
            <!-- bandeau de navigation -->
            <?php
            $pages = $this->paginator->getPages();
            //var_dump($this->paginator);
            //var_dump($pages);
            //var_dump(isset($pages->first));
            if ($pages->first != $pages->current) {
            echo "<a href=?page=$pages->firstPageInRange><<</a>&nbsp|&nbsp;";
            }
            if (isset($pages->previous)) {
                echo "<a href=?page=$pages->previous><</a>&nbsp|&nbsp;";
            }
            foreach ($pages->pagesInRange as $page) {
                echo "<a href=?page=$page>$page</a>&nbsp|&nbsp;";
            }
            if (isset($pages->next)) {
                echo "<a href=?page=$pages->next>></a>&nbsp|&nbsp;";
            }
            if ($pages->last != $pages->current) {
            echo "<a href=?page=$pages->lastPageInRange>>></a>&nbsp|&nbsp;";
            }
            ?>

        </table> 
    </body> 
</html>